//获取头像个人信息以及作品
//获取头像和获取个人信息
//导航栏
$('#f-nav').tooltip({
	default: 1, // 默认为空  --  选中默认值
	type: 'slideMove', // 必填, 选择内容
	success: function(ret) {} //初始化回调
});
var li = 0
$("#li_one").click(function() {
	if(li == "1") {
		$(".works_span_one").css("animation", "work_show 0.4s ease-in-out forwards")
		$(".works_span_tow").css("animation", "work_disappear 0.4s ease-in-out forwards")
		li = 0
	}
})
$("#li_tow").click(function() {

	if(li == "0") {
		$(".works_span_one").css("animation", "work_disappear 0.4s ease-in-out forwards")
		$(".works_span_tow").css("animation", "work_show 0.4s ease-in-out forwards")
		li = 1
	}
})

//翻页

$("#front_page").click(function() {

	if(now_page > 1) {
		now_page = now_page - 1;
		$("#now_page").text(now_page);
	}
	works_jubge()
})
$("#back_page").click(function() {

	if(now_page < max_page) {
		now_page = now_page + 1
		$("#now_page").text(now_page);
	}
	works_jubge()
})
//切换
$("#li_one").click(function() {
	$("#now_page").text("1")
	now_page = parseInt($("#now_page").text())
	works_jubge()
})

$("#li_tow").click(function() {
	$("#now_page").text("1")
	now_page = parseInt($("#now_page").text())
	works_jubge()
})
//搜索
$("#works_search_but").click(function() {
	if($("#works_search").val()) {}
})

//搜索栏
$("#works_search").focus(function() {
	$(".works_search_bg_text").text("")
})
$("#works_search").blur(function() {
	if($("#works_search").val() != "") {
		$(".works_search_bg_text").text("")
	} else {
		$(".works_search_bg_text").text("Search.....")
	}
})
}


var dataID
var datalength
var max_page = parseInt(datalength / 16) + 1
var now_page = parseInt($("#now_page").text())
var remain = length % 16

var dataID_prize
var datalength_prize
var max_page_prize = parseInt(datalength_prize / 16) + 1
var remain_prize = length_prize % 16

if($.cookie('uId')) {
	//通过uId获取作品id
	$.ajax({
		type: "post",
		headers: {
			ContentType: "application/x-www-form-urlencoded"
		},
		url: "",
		async: true,
		complete: function(res) {
			if(res.readyState == 4 && res.status == 200) {
				var obj = JSON.parse(res.responseText)
				dataID = obj.data
				datalength = obj.data.length()
			}
		},
	});
	//通过id获取作品
	//作品处理逻辑
	works_jubge()
}

实战

function works_jubge() {
}